# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
#   include csns::auth
class csns::auth {
  file{"/etc/nslcd.conf":
    mode       =>  '0644',
    owner      =>  'root',
    group      =>  'root',
    source     =>  "puppet:///modules/${module_name}/nslcd.conf",
  }~>
  class {'authconfig':
    ldap        => true,
    ldapauth    => true,
    ldapserver  => 'ldap.csns.ihep.ac.cn',
    ldapbasedn  => 'dc=ihep,dc=ac,dc=cn',
    sssd        => false,
    cache       => true,
    forcelegacy => true,
    mkhomedir   => true,
    #unless  => '/bin/grep -qc ldap /etc/pam.d/password-auth-ac'
  }
}
